﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ManageGBook.aspx.cs" Inherits="Manageweb_ManageGBook_ManageGBook" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
    
<link href="../images/css.css" rel="stylesheet" type="text/css" />

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table border="1" cellpadding="0" cellspacing="0" width="750">
            <tr>
                <td style="font-weight: bold; color: white; background-color: #507cd1; text-align: left">
                    &nbsp;管理留言</td>
            </tr>
        </table>
        <br />
        <table border="1" cellpadding="0" cellspacing="0" width="750" id="TABLE_Details" runat="server">
            <tr>
                <td colspan="4" style="font-weight: bold; color: white; background-color: #507cd1; text-align: left">
                    &nbsp;查看留言详细<asp:Label ID="LB_ID" runat="server" Visible="False"></asp:Label></td>
            </tr>
            <tr>
                <td style="width:150px;">
                    &nbsp;留言标题</td>
                <td style="text-align: left; width: 225px;">
                    &nbsp;<asp:Label ID="LB_Title" runat="server"></asp:Label></td>
                <td style="width:150px;">
                    &nbsp;留言姓名</td>
                <td style="text-align: left; width: 225px;">
                    &nbsp;<asp:Label ID="LB_Name" runat="server"></asp:Label></td>
            </tr>
            <tr>
                <td>
                    &nbsp;留言电话</td>
                <td style="text-align: left">
                    &nbsp;<asp:Label ID="LB_Tel" runat="server"></asp:Label></td>
                <td>
                    &nbsp;Email</td>
                <td style="text-align: left">
                    &nbsp;<asp:Label ID="LB_Email" runat="server"></asp:Label></td>
            </tr>
            <tr>
                <td>
                    &nbsp;留言QQ</td>
                <td style="text-align: left">
                    &nbsp;<asp:Label ID="LB_QQ" runat="server"></asp:Label></td>
                <td>
                    &nbsp;留言IP</td>
                <td style="text-align: left">
                    &nbsp;<asp:Label ID="LB_IP" runat="server"></asp:Label></td>
            </tr>
            <tr>
                <td>
                    &nbsp;是否显示</td>
                <td style="text-align: left">
                    &nbsp;<asp:Label ID="LB_State" runat="server"></asp:Label></td>
                <td>
                    &nbsp;留言时间</td>
                <td style="text-align: left">
                    &nbsp;<asp:Label ID="LB_DateTime" runat="server"></asp:Label></td>
            </tr>
            <tr>
                <td>
                    &nbsp;管理员回复</td>
                <td colspan="3" style="text-align: left">
                    &nbsp;<asp:TextBox ID="TB_Reply" runat="server" Height="100px" TextMode="MultiLine"
                        Width="450px"></asp:TextBox>
                    <asp:Button ID="Btn_Reply" runat="server" Text="添加回复" OnClick="Btn_Reply_Click" /></td>
            </tr>
            <tr>
                <td>
                    &nbsp;详细信息</td>
                <td colspan="3" style="text-align: left">
                    &nbsp;<asp:Label ID="LB_Content" runat="server"></asp:Label></td>
            </tr>
        </table>
        <br />
        <asp:Label id="LB_ManageGBook" runat="server" ForeColor="Red" Font-Size="Small" Font-Bold="True"></asp:Label><table border="1" cellpadding="0" cellspacing="0" width="750">
            <tr>
                <td>
                    <asp:GridView ID="GV_GBookList" runat="server" CellPadding="4" ForeColor="#333333"
                        Width="100%" AutoGenerateColumns="False" DataKeyNames="GBook_ID" DataSourceID="ODS_GBookList" AllowPaging="True" PageSize="15">
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <RowStyle BackColor="#EFF3FB" />
                        <EditRowStyle BackColor="#2461BF" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <AlternatingRowStyle BackColor="White" />
                        <Columns>
                            <asp:BoundField DataField="GBook_ID" HeaderText="GBook_ID" InsertVisible="False"
                                ReadOnly="True" SortExpression="GBook_ID" Visible="False" />
                            <asp:BoundField DataField="GBook_Title" HeaderText="标题" SortExpression="GBook_Title" />
                            <asp:TemplateField HeaderText="是否显示" SortExpression="GBook_State">
                                <ItemTemplate>
                                    <asp:Button ID="Btn_State" runat="server" Text='<%# FormatState(Eval("GBook_State")) %>' CommandArgument='<%# Eval("GBook_ID") %>' Width="60px" OnCommand="Btn_State_Command" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="是否回复" SortExpression="GBook_Reply">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# FormatReply(Eval("GBook_Reply")) %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:LinkButton ID="LBtn_View" runat="server" CommandArgument='<%# Eval("GBook_ID") %>' OnCommand="LBtn_View_Command">查看</asp:LinkButton>
                                    <asp:LinkButton ID="LBtn_Del" runat="server" CommandArgument='<%# Eval("GBook_ID") %>' OnCommand="LBtn_Del_Command" OnClientClick="return confirm('删除操作不可恢复，是否继续？')">删除</asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="GBook_DateTime" HeaderText="留言时间" SortExpression="GBook_DateTime" />
                        </Columns>
                    </asp:GridView>
                    <asp:ObjectDataSource ID="ODS_GBookList" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetDataOrderByDateTime" TypeName="AccessDAL.GBookTableAdapters.GBookTableAdapter"></asp:ObjectDataSource>
                </td>
            </tr>
        </table>
    
    </div>
    </form>
</body>
</html>
